package com.eop.managedBean;

import java.io.Serializable;
import java.util.Date;

import org.operamasks.faces.annotation.Accessible;
import org.operamasks.faces.annotation.Bind;
import org.operamasks.faces.annotation.SaveState;

import com.base.commons.SpringBeanHolder;
import com.eop.entity.SpecialInfor;
import com.eop.service.IEventService;
import com.eop.service.ISpecialInforService;

public class BaseSpecialInfoBean implements Serializable {
	protected ISpecialInforService spInfoService = SpringBeanHolder
			.getBean("specialInforService");
	protected IEventService eventService = SpringBeanHolder
			.getBean("eventService");
	@Bind
	@Accessible
	@SaveState
	protected String id;
	protected SpecialInfor sf;
	@Bind(id = "special_Scope", attribute = "value")
	protected String special_Scope;
	@Bind(id = "special_Injury", attribute = "value")
	protected String special_Injury;
	@Bind(id = "special_Death", attribute = "value")
	protected String special_Death;
	@Bind(id = "special_Property", attribute = "value")
	protected String special_Property;
	@Bind(id = "special_Affect", attribute = "value")
	protected String special_Affect;
	@Bind(id = "special_Set", attribute = "value")
	protected String special_Set;
	@Bind(id = "special_Continuous", attribute = "value")
	protected String special_Continuous;
	@Bind(id = "special_Content", attribute = "value")
	protected String special_Content;

	@Bind(id = "special_Date", attribute = "value")
	protected Date special_Date;

	protected void setSpeInfoProperty() {
		if (sf == null)
			return;
		sf.setId(id);
		// sf.setCreateDate(createDate);
		// sf.setCreateUser(createUser);
		// sf.setEvent_RangeB(eventRangeB);
		// sf.setEvent_RangeS(eventRangeS);
		sf.setSpecial_Affect(special_Affect);
		sf.setSpecial_Content(special_Content);
		sf.setSpecial_Continuous(special_Continuous);
		sf.setSpecial_Date(special_Date);
		sf.setSpecial_Death(special_Death);
		// sf.setSpecial_Dep(specialDep);
		sf.setSpecial_Injury(special_Injury);
		sf.setSpecial_Property(special_Property);
		sf.setSpecial_Scope(special_Scope);
		sf.setSpecial_Set(special_Set);

		sf.setDelFlag(false);
	}

	protected void getSpeInfoProperty(SpecialInfor sp) {
		id = sp.getId();
		special_Scope = sp.getSpecial_Scope();
		special_Injury = sp.getSpecial_Injury();
		special_Death = sp.getSpecial_Death();
		special_Property = sp.getSpecial_Property();
		special_Affect = sp.getSpecial_Affect();
		special_Set = sp.getSpecial_Set();
		special_Continuous = sp.getSpecial_Continuous();
		special_Content = sp.getSpecial_Content();
		special_Date = sp.getSpecial_Date();
	}
}
